<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page contentType="text/html; charset=UTF-8" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<html>
	<head>
		<title>Card Vault</title>
		<link href="<c:url value="/resources/css/normalize.css" />" rel="stylesheet" type="text/css" media="screen"/>
		<link href="<c:url value="/resources/css/bootstrap.min.css" />" rel="stylesheet" type="text/css" media="screen"/>
		<link href="<c:url value="/resources/css/style.css" />" rel="stylesheet" type="text/css" media="screen"/>
		<script src="<c:url value="/resources/js/jquery-1.8.3.min.js" />"></script>
		<script src="<c:url value="/resources/js/bootstrap.min.js" />"></script>
		<script src="<c:url value="/resources/js/scripts.js" />"></script>
	</head>
    <body>
        <div id="wrapper">
        	<div class="heading">Card Vault</div>
        	<h3 align="center">My Account</h3><br>
        	<h4 align="center">My Protected Cards</h4><br><br>
        	
        	<form class="form-horizontal form-horizontal_centered" >
	        	<c:forEach items="${cardlist}" var="card">
		        	<div class="control-group">
						<label class="control-label" for="inputIcon">${card.cardType}</label>
					  	<div class="controls">
					    	<div class="input-prepend">
						    	<span class="add-on"><i class="icon-user"></i></span>
						    	<input id="inputIcon" class="span2" style="width: auto;"  
						    			type="text" value="${card.cardNumber}">
						    </div>
						    <a class="btn btn-small" onclick="removeCreditCardFromMyAccount($(this))"
						   		href="${pageContext.request.contextPath}/user/delete_card/${card.id}">
						    	<i class="icon-trash"></i>
						    </a>
						</div>
					</div>
				</c:forEach>
				<br>
				<div class="control-group">
					<div class="controls btn-group">
						<button type="submit" class="btn btn-inverse" 
							onClick="document.location.replace('addcards');return false">Add new one</button>
						<button type="submit" class="btn btn-success"
							onClick="document.location.replace('termsandconditions');return false">Confirm</button>
					</div>
			  	</div>
			</form>
			<div class="fixed_block"> 
				<div id="fixed">
					<div class="mainview" align="center">
						<jsp:include page="service/fixed_block.jsp"></jsp:include>
					</div>
				</div> 
			</div>
        </div>
    </body>
</html>